note
	description: "Summary description for {US_PHONE_TOLL_FREE}."
	author: ""
	date: "$Date$"
	revision: "$Revision$"

class
	US_PHONE_TOLL_FREE 

inherit
	PHONE [US_PHONE_VALIDATOR_TOLL_FREE, US_PHONE_FORMATTER]

create
	make_with_toll_free_number,
	make_with_alpha

feature {NONE} -- Initialization

	make_with_toll_free_number (a_number: attached like number_type_anchor)
			-- Initialization for `Current'.
		do
			create validator
			create formatter
			check valid_number: validator.is_valid (a_number) end
			number := a_number
			country_code := check_digit_1
		ensure
			number_set: number.same_string (a_number)
		end

	make_with_alpha (a_iso_number: attached like number_type_anchor)
			-- <Precursor>
		do
			make_with_toll_free_number (iso_9995_8_number (a_iso_number))
		end

feature -- Constants

	check_digit_0: STRING = "0"

	check_digit_1: STRING = "1"

	check_digit_9: STRING = "9"

note
	copyright: "Copyright (c) 2012-2012, Greater Atlanta User Group for Eiffel (GAUGE)"
	license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
	licensing_options: "http://www.eiffel.com/licensing"
	copying: "[
			This file is part of the Greater Atlanta User Group for Eiffel (GAUGE), Eiffel Development Environment.
			
			GAUGE's Eiffel Development Environment is free
			software; you can redistribute it and/or modify it under
			the terms of the GNU General Public License as published
			by the Free Software Foundation, version 2 of the License
			(available at the URL listed under "license" above).
			
			GAUGE's Eiffel Development Environment is
			distributed in the hope that it will be useful, but
			WITHOUT ANY WARRANTY; without even the implied warranty
			of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
			See the GNU General Public License for more details.
			
			You should have received a copy of the GNU General Public
			License along with Eiffel Software's Eiffel Development
			Environment; if not, write to the Free Software Foundation,
			Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
		]"
	source: "[
			GAUGE
			Atlanta, GA
			Website http://www.atlantausergroups.com/group/gauge
		]"
end
